package BehaviorDesignPattern.VisitorPattern;

// 具体访问者1
class ConcreteVisitor1 implements Visitor {
    @Override
    public void visitConcreteElementA(ConcreteElementA element) {
        System.out.println(element.operationA() + " 被 具体访问者1 访问");
    }

    @Override
    public void visitConcreteElementB(ConcreteElementB element) {
        System.out.println(element.operationB() + " 被 具体访问者1 访问");
    }
}